﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="Adder.aspx.vb" Inherits="CW1.Adder" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .style2
        {
            font-family: Arial, Helvetica, sans-serif;
            font-size: large;
            color: #0066FF;
        }
        .style3
        {
            color: #0066FF;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <span class="style2">This is a simple application allows you to enter 2 numbers 
    and get their sum. </span>
    <br class="style3" />
    <span class="style2">Please enter two numbers, click the &quot;Add&quot; button to see the 
    result.</span><p>
        Enter the first number here:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:TextBox ID="tb_first" runat="server"></asp:TextBox>
        <asp:RangeValidator ID="RangeValidator1" runat="server" 
            ControlToValidate="tb_first" ErrorMessage="You must type in a number" 
            Type="Double" MaximumValue="10000000000000" MinimumValue="-10000000000000"></asp:RangeValidator>
    &nbsp;&nbsp;&nbsp;
        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
            ControlToValidate="tb_first" ErrorMessage="A number is needed"></asp:RequiredFieldValidator>
    </p>
    <p>
        Enter the second number here:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:TextBox ID="tb_second" runat="server"></asp:TextBox>
        <asp:RangeValidator ID="RangeValidator2" runat="server" 
            ControlToValidate="tb_second" ErrorMessage="You must type in a number" 
            Type="Double" MaximumValue="10000000000000" MinimumValue="-10000000000000"></asp:RangeValidator>
    &nbsp;&nbsp;&nbsp;
        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
            ControlToValidate="tb_second" ErrorMessage="A number is needed"></asp:RequiredFieldValidator>
    </p>
    <p>
        <asp:Button ID="btn_add" runat="server" Text="Add" />
    </p>
    <p>
&nbsp;<asp:Label ID="lbl_result" runat="server"></asp:Label>
    </p>
</asp:Content>
